/**
 * Company
 * Copyright (C) 1992-2020 All Rights Reserved.
 */
package com.yinhai.mycat_test.service;

import java.security.SecureRandom;
import java.time.LocalDateTime;

/**
 * @author wanggan@yinhai.com
 * @version 1.0
 * @date 2020/4/10 09:29
 * @since JDK1.8
 */
public class BaseService {
    /**
     * 获取orderid
     *
     * @return
     */
    public static Long getOrderId(){
        return System.currentTimeMillis()+new SecureRandom().nextLong();
//        return System.currentTimeMillis();
    }
    
    /**
     * 获取当前时间
     *
     * @return
     */
    public static LocalDateTime getNow(){
        return LocalDateTime.now();
    }
}
